import 'dart:async';

import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'yk_pda_plugin_method_channel.dart';

abstract class YkPdaPluginPlatform extends PlatformInterface {
  /// Constructs a YkPdaPluginPlatform.
  YkPdaPluginPlatform() : super(token: _token);

  static final Object _token = Object();

  static YkPdaPluginPlatform _instance = MethodChannelYkPdaPlugin();

  /// The default instance of [YkPdaPluginPlatform] to use.
  ///
  /// Defaults to [MethodChannelYkPdaPlugin].
  static YkPdaPluginPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [YkPdaPluginPlatform] when
  /// they register themselves.
  static set instance(YkPdaPluginPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future init(StreamController streamController) {
    throw UnimplementedError('init() has not been implemented.');
  }
}
